#!/bin/bash
TINYOS_ROOT='/opt/tinyos-2.1.0'
TINYOS_CP=$TINYOS_ROOT/support/sdk/java/tinyos.jar
deviceId=`expr match "$1" '.*\([0-9]\)'`
#echo $deviceId
if [ $# -lt 2 ]; then
	java -cp .:$TINYOS_CP PrintfClientTstamp -comm serial@$1:telosb > node_$deviceId.log
fi
